package com.whnk.web.controller.pm;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.whnk.framework.web.base.BaseController;
import com.whnk.pm.domain.EmpSignInfo;
import com.whnk.pm.domain.FullcalendarData;
import com.whnk.pm.service.IEmpSignInfoService;

/**
 * 个人考勤信息
 * 
 * @author whwhnk
 * @date 2019-09-27
 */
@Controller
@RequestMapping("/pm/empSignInfo")
public class EmpSignInfoController extends BaseController
{
    private String prefix = "pm/empSignInfo";
    
    @Autowired
	private IEmpSignInfoService empSignInfoService;
	
	@RequiresPermissions("pm:empSignInfo:view")
	@GetMapping()
	public String empSignInfo()
	{
	    return prefix + "/empSignInfo";
	}
	
	/**
	 * 查询个人考勤信息
	 */
	@PostMapping("/queryEmpSign")
	@ResponseBody
	public FullcalendarData queryEmpSign(EmpSignInfo empSignInfo)
	{
		return empSignInfoService.selectEmpSignInfos(empSignInfo);
	}
	
}
